package experimenttation;

/**
 * Created by 春旺 on 2017/4/14.
 */
public class Arry {
    public static void main(String[] args)
    {
        //定义一个数组
        int arr[] = {1,2,3,4,5,6,7,8};

        //打印原始数组的值
        for(int i:arr){
            System.out.print(i + " ");
        }
        System.out.println();

        // 添加代码删除上面数组中的5
        int [] arr1 = {1,2,3,4,6,7,8,0};
        arr = arr1;

        //打印出 1 2 3 4 6 7 8 0
        for(int i:arr){
            System.out.print(i + " ");
        }
        System.out.println();
        int arr2[] = {1,2,3,4,5,6,7,8};
        // 添加代码再在4后面5
        arr = arr2;
        //打印出 1 2 3 4 5 6 7 8
        for(int i:arr){
            System.out.print(i + " ");
        }
        System.out.println();
    }
}
